<?php

Loader::using(array(
    "ext::libs::phpUI::factories::UIControlFilter",
    "models::entities::CamposFormularios",
));

abstract class QuestionBasedUIControlFilter implements UIControlFilter {

    private static $question;
    private static $decodedParams;

    /**
     *
     * @return CamposFormularios
     */
    public function getQuestion() {
        return self::$question;
    }

    public static function setQuestion(CamposFormularios &$question) {
        self::$question = $question;
        $json = self::$question->getParams();
        self::$decodedParams = json_decode($json);
    }

    /**
     *
     * @return array
     */
    public function getDecodedParams() {
        return self::$decodedParams;
    }

}

?>